<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title></title>
</head>

<body>

	<input type="button" name="btn" id="btn" value="短信验证码" />
	<script src="1.9.1jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$('#btn').on('click', function () {
			$.ajax({
				type: "post",
				data: {
					userphone: '13560512998'//换成你的号码即可
				},
				url: "api/duanxin.php",
				async: true,
				success: function (str) {
					console.log(str);
				}
			});
		});
	</script>
</body>

</html>